/*
 * FtpAdapter.h
 *
 *  Created on: Nov 10, 2012
 *      Author: Scorpion
 */

#ifndef FTPADAPTER_H_
#define FTPADAPTER_H_
#include "AdapterBase.h"
#include "CurlBuilder.h"
namespace centny {
	using namespace file;
class FtpAdapter: public NetAdapterBase {
public:
	FtpAdapter();
	virtual ~FtpAdapter();
	virtual FInfo* root();
	virtual vector<FInfo*> subs(FInfo* parent);
	virtual vector<FInfo*> convert(FInfo* parent, stringstream& buf);
	virtual FInfo* convertOne(FInfo* parent, string line);
	virtual const char* upload(FInfo* fi, string lf, string name);
	virtual const char* upload(FInfo* fi, istream& is, string name);
	virtual const char* download(FInfo* fi, string lf);
	virtual const char* download(FInfo* fi, ostream& os);
	virtual NetFInfo* mkdir(FInfo* fi, string name);
};

} /* namespace centny */
#endif /* FTPADAPTER_H_ */
